#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/9/17 15:24
# @Author : lenovo
# @Email : 26541796406@qq.com
# @File : MRYX_SEARCH_004.py
# @Project : mryx_test
"""验证进入口碑推荐榜"""
from appium import webdriver
from time import sleep
from appium.webdriver.common.mobileby import MobileBy as By
desired_capabilites = {
    "platformName":"Android",
    "deviceName":"5ENDU19222007479",
    "platformVersion":"10",
    "appPackage":"cn.missfresh.application",
    "appActivity":"cn.missfresh.module.main.view.SplashActivity",
    "noReset":True,
    "resetKeyboard":True
}
driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_capabilites)
sleep(3)
driver.find_element(By.XPATH,'	/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.'
                             'FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.'
                             'FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.'
                             'RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.'
                             'LinearLayout/android.widget.FrameLayout/android.widget.TextView').click() #点击搜索输入框
sleep(2)
driver.find_element(By.ID,'cn.missfresh.application:id/hot_sale_sub_title').click()  # 点击查看全部
Word_mouth = driver.find_element(By.ID,'cn.missfresh.application:id/tv_title_bar_center_txt').text  # 获取口碑推荐文本